<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>

<body>

    <script>

        //原代码
        function startMeeting() {

            var canStart = false;
            var selectedRow = [];//获取选中行
            if (selectedRow.length > 0) {
                var id = selectedRow.id;
                //继续下来逻辑
                if (true) {

                }
            }
        }

        //新代码  提前返回 减少{}嵌套深度  代码平行化
        function startMeeting() {
            var canStart = false;
            var selectedRow = [];//获取选中行
            if (selectedRow.length == 0) {
                return false;
            }
            var id = selectedRow.id;
            //继续下来逻辑
            if (false) {
                return false;
            }
            //继续下来逻辑
        }

    </script>

</body>

</html>